package com.hr.异步调用;

import lombok.SneakyThrows;
import lombok.extern.slf4j.Slf4j;

/**
 * @program: leetcode
 * @description:
 * @author: HuRan QQ1345122890
 * @create: 2021-08-11 16:29
 */
@Slf4j(topic = "demo03")
public class Demo03 {
    public static void main(String[] args) throws InterruptedException {
        Thread t1= new Thread("t1"){
            @Override
            public void run() {
               log.debug("enter sleep");
               try {
                   Thread.sleep(3000);
               }catch (Exception e){
                e.printStackTrace();
               }
            }
        };
        t1.start();
        Thread.sleep(1000);
        t1.interrupt();
    }

}